import request from "@/config/axios/service";

export function getDevice(params) {
  return request({
    url: "/Device/GetPageList",
    method: "get",
    params,
  });
}

export function postDevice(data) {
  return request({
    url: "/Device/Add",
    method: "post",
    data,
  });
}

export function putDevice(data) {
  return request({
    url: "/Device/Update",
    method: "put",
    data,
  });
}

export function getRecipe(params) {
  return request({
    url: "/Recipe/GetPageList",
    method: "get",
    params,
  });
}
export function createRecipe(data) {
  return request({
    url: "/Recipe/CreateNew",
    method: "post",
    data,
  });
}

export function postRecipe(data) {
  return request({
    url: "/Recipe/Add?deviceCode=" + data.deviceCode,
    method: "post",
    data,
  });
}
export function putRecipe(data) {
  return request({
    url: "/Recipe/Update",
    method: "put",
    data,
  });
}
export function deleteRecipe(data) {
  return request({
    url: "/Recipe/Delete",
    method: "delete",
    data,
  });
}

export function postCheck(data) {
  return request({
    url: "/Recipe/Check",
    method: "post",
    data,
  });
}
export function putFistReviewResult(params) {
  return request({
    url: "/RecipeReview/SetFistReviewResult",
    method: "put",
    params,
  });
}
export function putSecondReviewResult(params) {
  return request({
    url: "/RecipeReview/SetSecondReviewResult",
    method: "put",
    params,
  });
}
